#import "CameraParameter.h"

@implementation CameraParameter
{
}

@synthesize bgImageData;
@synthesize bgImageData1;
@synthesize bMiniature;
@synthesize bSaveInGallery;
@synthesize nCameraFlashMode;
@synthesize strCameraBGColor;
@synthesize strCameraPressedBG;
@synthesize fQuality;
@synthesize targetWidth;
@synthesize targetHeight;
@synthesize bOpacity;
@synthesize nDefaultFlash;
@synthesize bSwitchFlash;
@synthesize nDefaultCamera;
@synthesize bSwitchCamera;

- (id)initWithCommand:(CDVInvokedUrlCommand *)command {
    //  [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
    //    mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
    if (self = [super init]) {
        
//        NSString *strData = [command argumentAtIndex:0];
//        if (strData) {
//            bgImageData = [[NSData alloc] initWithBase64EncodedString:strData options:0];
//        }
//        else {
            bgImageData = nil;
//        }

//        NSString *strData1 = [command argumentAtIndex:1];
//        if (strData1) {
//            bgImageData1 = [[NSData alloc] initWithBase64EncodedString:strData1 options:0];
//        }
//        else {
            bgImageData1 = nil;
//        }

        bMiniature = false; //[[command argumentAtIndex:2] boolValue];
        bSaveInGallery = [[command argumentAtIndex:9] boolValue];
        strCameraBGColor = @"#e26760"; //[command argumentAtIndex:4];
        strCameraPressedBG = @"#dc453d"; //[command argumentAtIndex:5];

        
        fQuality = [[command argumentAtIndex:0] intValue];
        
        targetWidth = [[command argumentAtIndex:3] intValue];
        targetHeight = [[command argumentAtIndex:4] intValue];

        
        bOpacity = false; //[[command argumentAtIndex:7] boolValue];
        nDefaultFlash = 2; //[[command argumentAtIndex:8] intValue];
        bSwitchFlash = true; //[[command argumentAtIndex:9] boolValue];
        nDefaultCamera = 0; //[[command argumentAtIndex:10] intValue];
        bSwitchCamera = true; //[[command argumentAtIndex:11] boolValue];
        
    }
    return self;
}

@end
